#include <stdio.h>
#include <stdlib.h>

int main(){
    short int a = 0x1234;
    short int p = htons(a);
    char *ptr = (char *)(&p);
    printf("%x",*ptr);
    return 0;
}